home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / include / amiga20 / clib / iffparse_protos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-11  |  3.5 KB  |  81 lines

  1. #ifndef  CLIB_IFFPARSE_PROTOS_H
  2. #define  CLIB_IFFPARSE_PROTOS_H
  3. /*
  4. **    $Filename: clib/iffparse_protos.h $
  5. **    $Release: 2.04 $
  6. **    $Revision: 30.156 $
  7. **    $Date: 1995/01/11 05:18:09 $
  8. **
  9. **    C prototypes. For use with 32 bit integers only.
  10. **
  11. **    (C) Copyright 1990 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14. /* "iffparse.library" */
  15. #ifndef  EXEC_TYPES_H
  16. #include <exec/types.h>
  17. #endif
  18. /*--- functions in V33 or higher (distributed as Release 1.2) ---*/
  19. /*------ Basic functions ------*/
  20. struct IFFHandle *AllocIFF( void );
  21. LONG OpenIFF( struct IFFHandle *iff, long rwMode );
  22. LONG ParseIFF( struct IFFHandle *iff, long control );
  23. void CloseIFF( struct IFFHandle *iff );
  24. void FreeIFF( struct IFFHandle *iff );
  25. /*------ Read/Write functions ------*/
  26. LONG ReadChunkBytes( struct IFFHandle *iff, APTR buf, long size );
  27. LONG WriteChunkBytes( struct IFFHandle *iff, APTR buf, long size );
  28. LONG ReadChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord,
  29.     long nRecords );
  30. LONG WriteChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord,
  31.     long nRecords );
  32. /*------ Context entry/exit ------*/
  33. LONG PushChunk( struct IFFHandle *iff, long type, long id, long size );
  34. LONG PopChunk( struct IFFHandle *iff );
  35. /*------ Low-level handler installation ------*/
  36. LONG EntryHandler( struct IFFHandle *iff, long type, long id, long position,
  37.     struct Hook *handler, APTR object );
  38. LONG ExitHandler( struct IFFHandle *iff, long type, long id, long position,
  39.     struct Hook *handler, APTR object );
  40. /*------ Built-in chunk/property handlers ------*/
  41. LONG PropChunk( struct IFFHandle *iff, long type, long id );
  42. LONG PropChunks( struct IFFHandle *iff, LONG *propArray, long nProps );
  43. LONG StopChunk( struct IFFHandle *iff, long type, long id );
  44. LONG StopChunks( struct IFFHandle *iff, LONG *propArray, long nProps );
  45. LONG CollectionChunk( struct IFFHandle *iff, long type, long id );
  46. LONG CollectionChunks( struct IFFHandle *iff, LONG *propArray, long nProps );
  47. LONG StopOnExit( struct IFFHandle *iff, long type, long id );
  48. /*------ Context utilities ------*/
  49. struct StoredProperty *FindProp( struct IFFHandle *iff, long type, long id );
  50. struct CollectionItem *FindCollection( struct IFFHandle *iff, long type,
  51.     long id );
  52. struct ContextNode *FindPropContext( struct IFFHandle *iff );
  53. struct ContextNode *CurrentChunk( struct IFFHandle *iff );
  54. struct ContextNode *ParentChunk( struct ContextNode *contextNode );
  55. /*------ LocalContextItem support functions ------*/
  56. struct LocalContextItem *AllocLocalItem( long type, long id, long ident,
  57.     long dataSize );
  58. APTR LocalItemData( struct LocalContextItem *localItem );
  59. void SetLocalItemPurge( struct LocalContextItem *localItem,
  60.     struct Hook *purgeHook );
  61. void FreeLocalItem( struct LocalContextItem *localItem );
  62. struct LocalContextItem *FindLocalItem( struct IFFHandle *iff, long type,
  63.     long id, long ident );
  64. LONG StoreLocalItem( struct IFFHandle *iff, struct LocalContextItem *localItem,
  65.     long position );
  66. void StoreItemInContext( struct IFFHandle *iff,
  67.     struct LocalContextItem *localItem,
  68.     struct ContextNode *contextNode );
  69. /*------ IFFHandle initialization ------*/
  70. void InitIFF( struct IFFHandle *iff, long flags, struct Hook *streamHook );
  71. void InitIFFasDOS( struct IFFHandle *iff );
  72. void InitIFFasClip( struct IFFHandle *iff );
  73. /*------ Internal clipboard support ------*/
  74. struct ClipboardHandle *OpenClipboard( long unitNum );
  75. void CloseClipboard( struct ClipboardHandle *clipboard );
  76. /*------ Miscellaneous ------*/
  77. LONG GoodID( long id );
  78. LONG GoodType( long type );
  79. STRPTR IDtoStr( long id, STRPTR buf );
  80. #endif     /* CLIB_IFFPARSE_PROTOS_H */
  81.